package guiWindows;

import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JButton;
import javax.swing.BorderFactory;
import javax.swing.border.TitledBorder;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class GUIYawl2Fsp extends JFrame {

	private static final long serialVersionUID = 1L;
	private JPanel mainPanel = null;
	private JScrollPane scrollArea = null;
	private JTextArea yawl2fspArea = null;
	private JButton cancelButton = null;
	private JPanel buttonPanel = null;  //  @jve:decl-index=0:visual-constraint="732,333"

	/**
	 * @param owner
	 */
	public GUIYawl2Fsp() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(700, 500);
		this.setTitle("PROCESS RESULT");
		this.setLocationRelativeTo(null);
		this.setContentPane(getMainPanel());
	}

	/**
	 * This method initializes mainPanel
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getMainPanel() {
		if (mainPanel == null) {
			mainPanel = new JPanel();
			mainPanel.setLayout(new BorderLayout());
			mainPanel.setBorder(BorderFactory.createTitledBorder(null, "Result yawl2fsp", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
			mainPanel.add(getScrollArea(), BorderLayout.CENTER);
			mainPanel.add(getButtonPanel(),BorderLayout.SOUTH);
		}
		return mainPanel;
	}

	/**
	 * This method initializes scrollArea	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	public JScrollPane getScrollArea() {
		if (scrollArea == null) {
			scrollArea = new JScrollPane();
			scrollArea.setViewportView(getYawl2fspArea());
		}
		return scrollArea;
	}

	/**
	 * This method initializes yawl2fspArea	
	 * 	
	 * @return javax.swing.JTextArea	
	 */
	public JTextArea getYawl2fspArea() {
		if (yawl2fspArea == null) {
			yawl2fspArea = new JTextArea();
		}
		return yawl2fspArea;
	}

	/**
	 * This method initializes cancelButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	public JButton getCancelButton() {
		if (cancelButton == null) {
			cancelButton = new JButton("CLOSE");
			cancelButton.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					dispose();
					setVisible(false);
				}
			});
		}
		return cancelButton;
	}

	/**
	 * This method initializes buttonPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getButtonPanel() {
		if (buttonPanel == null) {
			buttonPanel = new JPanel();
			buttonPanel.setLayout(new FlowLayout());
			buttonPanel.setSize(new Dimension(48, 43));
			buttonPanel.add(getCancelButton(), null);
		}
		return buttonPanel;
	}

}
